/**
 * 
 */
package tk.sunlatus.project.usermanage.service.impl;

import java.util.List;

import tk.sunlatus.project.common.domain.Page;
import tk.sunlatus.project.usermanage.dao.UserDao;
import tk.sunlatus.project.usermanage.domain.User;
import tk.sunlatus.project.usermanage.service.UserService;

/**
 * 为web提供用户管理服务
 * 
 * @author sunlotus
 */
public class UserService4WebImpl implements UserService {

    private UserDao userDao = null;

    public User queryByID(String userID) {
        return userDao.queryByID(userID);
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    @Override
    public void createUser(User user) {
        userDao.saveUser(user);

    }

    @Override
    public List<User> queryUserList(User user, Page page) {
        return userDao.queryUserList(user, page);
    }

    @Override
    public User updateUser(User user) {
        return userDao.updateUser(user);
    }

    public User deleteUser(User user, boolean deleteFlag) {
        return userDao.deleteUser(user, deleteFlag);
    }
    
}
